package com.example.mybatispuls.company.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.example.mybatispuls.company.entity.Company;
import com.example.mybatispuls.company.mapper.CompanyMapper;
import com.example.mybatispuls.company.service.CompanyService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 开发者
 * @since 2022-05-12
 */
@Service
@DS("slave_1")
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements CompanyService {
    @Autowired
    private CompanyMapper companyMapper;

    @Override
    public List<Company> queryCompany() {
        return companyMapper.selectList(null);
    }
}
